package com.example.mybatis.service;

import com.example.mybatis.model.User;
import com.example.mybatis.mapper.UserMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class UserService {

    @Resource
    private UserMapper userMapper;

    public List<User> selectAll() {
        return userMapper.selectAll();
    }


    public int add(User user) {
        return userMapper.add(user);
    }

    public int updatePassword(int id,String password) {
        return userMapper.updatePassword(id,password);
    }

    public int delete(int id) {
        return userMapper.delete(id);
    }
}
